package com.zw.feign;

import com.zw.domain.User;
import com.zw.feign.impl.UserClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(value = "user-server",fallback = UserClientImpl.class)
public interface FeignUserClient {
    @GetMapping("/user/{id}")
    User getUserById(@PathVariable("id")Long id);
}